/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine - graphics
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AEBasicRenderLoop.h
// Author:		Gianluca Belardelli
// Date:		15/12/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEBASICRENDERLOOPI_H_
#define _AEBASICRENDERLOOPI_H_

class AEBasicRenderLoop : public AERenderLoopI
{
// Members
protected:
	AEBOOL32 m_bInitialized;
	AEUINT32 m_uiFrameCounter;

	AEStaticGeometryInstanceCollection *m_lpGeometryInstanceCollection;
// Methods
public:
	/// \brief
	///   Render Loop constructor.
	/// 
	/// Constructor of the render loop class. 
	AEBasicRenderLoop( void );

	/// \brief
	///   Render Loop destructor.
	/// 
	/// Destructor of the render loop class. 
	~AEBasicRenderLoop( void );
	
	/// \brief
	///   Initializes the render loop.
	/// 
	/// Initialization method for the render loop (in case you're writing a custom render loop, take
	/// the base class implementation as a sample).
	/// 
	/// This is the recommended place for allocating memory and defining settings that will be used
	/// over the course of all frames to be rendered with this render loop.
	virtual void InitRenderLoop( void );
	
	/// \brief
	///   De-initializes the render loop.
	/// 
	/// De-initialization method for the render loop (in case you're writing a custom render loop,
	/// take the base class implementation as a sample).
	virtual void DeInitRenderLoop( void );

	/// \brief
	///   Main render loop callback function.
	/// 
	/// This is the actual render loop implementation. It serves as a callback function which will be
	/// executed by the engine.
	///
	/// \param pUserData
	///   The user data of the render context that calls the rendering. See VisRenderContext_cl::GetUserData.
	/// 
	/// \note
	///   There are a number of API methods (mostly in the Vision::RenderLoopHelper class) which may
	///   only be called from this method.
	/// 
	/// \note
	///   Certain operations are illegal in this method (e.g. creating and deleting entities, lights,
	///   or similar scene elements; changing basic renderer settings).
	virtual void OnDoRenderLoop( void *lpUserData );
};

#endif // _AEBASICRENDERLOOPI_H_
